package zut.cs.liziflower.service;

import io.swagger.models.auth.In;
import zut.cs.liziflower.entity.Consumer;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xuwenke
 * @since 2022-05-17
 */
public interface IConsumerService extends IService<Consumer> {
    //根据姓名和密码获取用户
    Consumer getByNameAndPassword(String username, String password);
    Consumer login(String username, String password);

    //更新帐户信息，成功返回true,失败返回false
    boolean updateInfo(Integer userid, Integer age, String sex, String phone, String password);

    int updateMoneyAndScore(Integer userid,BigDecimal money,Integer score);

    int updateAvator(Integer userid, String url);
}
